package com.supermarket.service.lmpl;

import com.supermarket.dao.Userdao;
import com.supermarket.entity.User;
import com.supermarket.service.Userservice;
import com.supermarket.util.sqlsession;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

public class UserserviceImpl implements Userservice {
   public static SqlSession getsqlsession;
    static {
        getsqlsession = sqlsession.getsqlsession ();
    }
    public Boolean judgment(User user) {


        List<User> judgment = getsqlsession.getMapper ( Userdao.class ).judgment ( user );
//        List<User> judgment = userdao.judgment ( user );
        if (judgment.size ()==1){
            return true;
        }

        return false;
    }

}
